home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wildcat Gold - The Optical BBS
/
Wildcat Gold - The Optical BBS (The Golden ROM Series)(Volume 4 Number 1)(The Digital Publishing Company)(1992).ISO
/
sdn
/
taskmst.sdn
/
TM480.EXE
/
TMEXAM.EXE
/
WHEREIS.TSK
< prev
next >
Wrap
Text File
|
1991-09-10
|
3KB
|
131 lines
; Title : WHEREIS.TSK Last Updated : June 17, 1991
; Author : Steve Johnson - FmP. Version : 1.00
; Purpose : Helps locate datafiles based on APPEND
; Notes : Uses Environment variable and shows how SCAN can
; : be used to extract parts of a string.
hexvar esc,1b
var applist,100,$append
var target_dir,30
var target,40
var filename,12,' WHEREIS' ;default only used if no forms
int count
logical continue
logical forever
var null,1
vconst cls,11
vconst nor,71
vconst attn,79
vconst bright,41
var wdir,64
end
forms logon.ovr
dir whereis.ovr
if not found
insert filename filename
put "NO_FORMS"
stop
fi
forms whereis.ovr
move 'WORDPROC.TM' to filename
user wdir
until forever
fieldfill filename
put problem noclear
if anyfk
stop
fi
get filename
upper filename
trim filename
if applist = null
put 'NOT_ENVIRONMENTALLY_FRIENDLY' noclear
stop
else
display NOR bright cls
displayln 'Your working directory is: ' wdir
dir filename
if found
display NOR 27 ATTN wdir '\' filename ' exists' NOR
else
display 27 '(' wdir '\' filename ' NOT present)'
fi
displayln 1
displayln "Your APPEND environment variable contains:"
display ATTN applist NOR
displayln 1
displayln 1
fi
replace all '\\' of applist with '\'
setscan applist
move ';' to delim
move true to continue
clear count
until not continue
clear target_dir
scan target_dir
move found to continue
if found
displayln 'Element ' count ' of APPEND is ' target_dir
combine target_dir '\' filename into target
replace all '\\' of target with '\'
dir target
if found
display NOR 27 ATTN target ' exists' NOR
else
display 27 '(' target ' NOT present)'
fi
DISPLAYLN 1
fi
fi count
wait 'Press any key to continue or <esc> to quit'
if keyval = esc
stop
fi
fi
stop
endtask
@video
@head left,WHEREIS.TSK
@head right,'Taskmaster (C) FmP 1991'
@head centre,'Environmentally Friendly'
@nf problem
@acceptfk f10
@str
@bright
@colour char,white,red
@banner
@colour page,white,green
The APPEND command enables programs to find datafiles which are
located in directories other than the working directory.
Generally this is a good thing; if however you need to know exactly
which version of a file the operating system is finding this task can
help.
The task works by looking at the APPEND environment variable one
element at a time and checking if the file you are interested in is
located there.
Which file are you interested in? [WORDPROC.TM ] You may use ? and *
@col char,white,red
Press F10 to quit
@end
@nf not_environmentally_friendly
@col char,white,red
@win line15,column10,depth7,width60,pattern 177
@bright
@win line16,column15,depth5,width50
You don't have APPEND in your environment!
You may add it by including the line:
APPEND /e
as the 1st APPEND command in AUTOEXEC.BAT
@end
@eof